<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="./lib/react.development.js"></script>
    <script src="./lib/react-dom.development.js"></script>
    <script src="./lib/babel.min.js"></script>
</head>

<body>
    <div id="root"></div>
</body>
<script type="text/babel">
    const root = ReactDOM.createRoot(document.querySelector('#root'))
    let class1 = 'c1'
    // 使用插值表达式渲染属性，外面不能加“”
    let styles = {
        className:'c1',
        id:'box',
        tel:'1314456454'
    }
    root.render((
        <>
            <div className={class1} >我是div</div>
            <div className={styles.className} id={styles.id} tel={styles.tel}>多属性</div>
            <div {...styles}>多属性,一次性渲染</div>
        </>
    ))
</script>

</html>